/*
 * commons is a based project implemented
 * Copyright (C) 2024 Jasmine
 */
package com.easy.core.domain.entity;

import java.io.Serializable;
import java.time.LocalDateTime;

import com.baomidou.mybatisplus.annotation.OrderBy;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableLogic;

import io.swagger.v3.oas.annotations.media.Schema;

/**
 * 基础Bean
 *
 * @author Jasmine
 * @since 1.0.0
 */
@Schema(name = "基础Bean", description = "")
public class BaseEntity implements Serializable {
    private static final long serialVersionUID = 2369954420554172338L;

    @Schema(name = "创建时间", example = "")
    @TableField("create_time")
    @OrderBy
    private LocalDateTime createTime;

    @Schema(name = "更新时间", example = "")
    @TableField("update_time")
    private LocalDateTime updateTime;

    @Schema(name = "删除状态:false-未删除，true-已删除;详情见DeleteEnum中枚举", example = "true")
    @TableLogic()
    @TableField("deleted")
    private Boolean deleted;

    public LocalDateTime getCreateTime() {
        return createTime;
    }

    public void setCreateTime(LocalDateTime createTime) {
        this.createTime = createTime;
    }

    public LocalDateTime getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(LocalDateTime updateTime) {
        this.updateTime = updateTime;
    }

    public Boolean getDeleted() {
        return deleted;
    }

    public void setDeleted(Boolean deleted) {
        this.deleted = deleted;
    }
}
